package writer;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @author 王艺锡
 * @version 1.0
 */
public class BufferedWriter_ {
    public static void main(String[] args) throws IOException {
        String filePath = "e:\\BufferedWriter.txt";
        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(filePath,true));
        String str = "Long time no see!";
        bufferedWriter.write(str);
        bufferedWriter.newLine();//插入一个换行符
        bufferedWriter.write(str);
        bufferedWriter.newLine();//插入一个换行符
        bufferedWriter.write(str);
        bufferedWriter.newLine();//插入一个换行符
        //关闭流
        bufferedWriter.close();

    }
}
